/*************************************************************************  
 *   This file is part of UBBMPSREADER.
 *
 *   UBBMPSREADER is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   UBBMPSREADER is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with UBBMPSREADER.  If not, see <http://www.gnu.org/licenses/>. 
 *************************************************************************/

package cs.ubbcluj.ro.mps.data.interfaces;

import java.util.Map;

import cs.ubbcluj.ro.mps.data.ConstrainType;


/**
 * A constrain from the MPS file
 * 
 * @author avadas
 * @version 1.0
 */
public interface Constrain {
    /**
     * Returns the name of the constrain (equation)
     * 
     * @return the name of the constrain
     */
    String getName();

    /**
     * Adds a variable to the constrain
     * 
     * @param variableName
     *            the name of the variable
     * @param coeficient
     *            the coefficient
     */
    void addVariable(final String variableName, final double coeficient);

    /**
     * 
     * @param variableName
     *            the variableName
     * @return true if the variable has different value from zero (is present)
     */
    boolean containsVariable(final String variableName);

    /**
     * 
     * @return all variables with coefficient different from zero
     */
    Map<String, Double> getVariables();

    /**
     * 
     * @param variableName
     *            the name of the variable
     * @return
     */
    double getCoefficient(final String variableName);

    /**
     * 
     * @return the type of the constrain (L, G, E, N)
     */
    ConstrainType getType();
}
